package com.cmwa.solution.sys.attach.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import com.cmwa.solution.sys.attach.dao.AttachRelDao;
import com.cmwa.solution.sys.attach.service.AttachRelService;

import com.cmwa.solution.sys.attach.entity.AttachRelVo;

import java.util.List;
import com.cmwa.solution.base.entity.Page;
import com.cmwa.solution.base.entity.SearchParam;

/**
 * 附件关联关系表业务实现层
 * 
 * @author ex-chenxh
 * @date 2019-02-15 13:36:34
 */
@Service
public class AttachRelServiceImpl implements AttachRelService {
	@Resource
	private AttachRelDao attachRelDao;
	
		
	@Override
	public void insertAttachRel(AttachRelVo attachRel) {
		attachRelDao.insertAttachRel(attachRel);
	}
	
		
		
	@Override
	public void physicDeleteAttachRelById(String id) {
		attachRelDao.physicDeleteAttachRelById(id);
	}
	
		
		
	@Override
	public void logicDeleteAttachRelById(String id) {
		attachRelDao.logicDeleteAttachRelById(id);
	}
	
		
		
	@Override
	public void updateAttachRelById(AttachRelVo attachRel) {
		attachRelDao.updateAttachRelById(attachRel);
	}
	
		
		
	@Override
	public Page<AttachRelVo> attachRelListPage(SearchParam sp) {
		List<AttachRelVo> items = attachRelDao.attachRelListPage(sp);
		return Page.create(items, sp.getStart(), sp.getLimit(), sp.getTotal());
	}
	
		
		
	@Override
	public AttachRelVo getAttachRelById(String id) {
		return attachRelDao.getAttachRelById(id);
	}
	
		
	
}
